package com.cswangdao.mapper;

import com.cswangdao.domain.dto.GoodsNumberDTO;
import com.cswangdao.domain.model.MarketGoodsProduct;
import com.cswangdao.domain.po.GoodsProduct;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MarketGoodsProductMapper {


    /** 
     * @description: 批量插入商品生产信息
     * @param: products
     * @return: void
     */ 
    void insertBatch(List<GoodsProduct> products);




    void updateNumber(GoodsNumberDTO goodsNumberDTOS);

    @Delete("delete from market_goods_product where goods_id = #{goodsId} ")
    void deletsByGoodsId(Integer goodsId);

    List<MarketGoodsProduct> getByGoodsId(@Param("goodsId") int goodsId);

    void updateById(GoodsProduct goodsProduct);

    MarketGoodsProduct getById(@Param("productId") Integer productId);

    List<MarketGoodsProduct> getProductByIds(List<Integer> productIds);


    void update2ById(MarketGoodsProduct goodsProduct);
}